<template>
	<view @click="go">
		<view class="content">
			<block v-for="(item,index) in preferdata" :key="index">
				<view class="prefer-view">
					<image :src="item.image" mode="aspectFill"></image>
					<view class="details">
						<text>{{item.title}}</text>
						<text>{{item.lable}}</text>
						<text>{{item.peisong}}</text>
						<text>{{item.caixi}}</text>
					</view>
				</view>
			</block>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				preferdata: [
					{
						'image':'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1602569726438&di=3dfea911593af015c08796ca01b2b7d5&imgtype=0&src=http%3A%2F%2Fp1.meituan.net%2Fwmproduct%2Fa9f05c1182c93e8de12601762bf67f03764666.jpg%2540700w_700h_0e_1l%257Cwatermark%3D1%26%26r%3D1%26p%3D9%26x%3D2%26y%3D2%26relative%3D1%26o%3D20',
						'title':'福润隆超市',
						'lable':'月售200 约20分钟',
						'peisong':'起送￥1 配送￥0.3 人均￥20',
						'caixi':'浙江菜',
					},
				]
			}
		},
		methods:{
			go(){
				console.log('8888')
				this.$emit('tiaozhuan')
				
				// 保留当前页面，跳转到应用内的某个页面
				uni.navigateTo({
					url:'../FRL/FRL',
					success:()=>{
						console.log('跳转到商家')
					}
				})
			},
			
		}
	}
</script>

<style>
	.prefer-view {
		height: 220upx;
		width: 100%;
		padding: 0 8upx;
		border-bottom: 3upx solid #c1c1c1;
	}
	.prefer-view image {
		float: left;
		margin-top: 16upx;
		width: 300upx;
		height: 200upx;
		border-radius: 8upx;
	}
	.prefer-view .details {
		float: right;
		margin-top: 16upx;
		width: 400upx;
		height: 200upx;
	}
	.prefer-view .details text {
		height: 45upx;
		line-height: 45upx;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
		overflow: hidden;
	}
	.prefer-view .details text:nth-child(1) {
		font-size: 30upx;
	}
	.prefer-view .details text:nth-child(2) {
		font-size: 27upx;
		color: #9c9c9c;
	}
	.prefer-view .details text:nth-child(3) {
		font-size: 27upx;
		color: #9c9c9c;
	}
	.prefer-view .details text:nth-child(4) {
		font-size: 27upx;
		color: #9c9c9c;
	}
	.uploading {
		width: 10upx;
		height: 10upx;
		margin: 0 auto;
	}
</style>